<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
  <title>inputEx - PasswordField Usage</title>

<!-- YUI CSS -->
<link rel="stylesheet" type="text/css" href="../lib/yui/reset/reset-min.css">
<link rel="stylesheet" type="text/css" href="../lib/yui/fonts/fonts-min.css">
<link rel="stylesheet" type="text/css" href="../lib/yui/container/assets/container.css"> 
<link rel="stylesheet" type="text/css" href="../lib/yui/assets/skins/sam/skin.css">

<!-- InputEx CSS -->
<link type='text/css' rel='stylesheet' href='../css/inputEx.css' />

<!-- Demo CSS -->
<link rel="stylesheet" type="text/css" href="css/demo.css"/>
<link rel="stylesheet" type="text/css" href="css/dpSyntaxHighlighter.css">

 </head>

 <body>

<p class='demoTitle'>inputEx - PasswordField Usage</p>


<!-- Example 1 -->
<div class='exampleDiv'>

	<p class="title">Basic PasswordField creation</p>
	
	<p>Use the following code to create a basic inputEx PasswordField.</p>

	<div class='demoContainer' id='container1'></div>

	<div class='codeContainer'>
				<textarea name="code" class="JScript">
			new YAHOO.inputEx.PasswordField({parentEl: 'container1', showMsg: true});
		</textarea>
			</div>

</div>


<!-- Example 2 -->
<div class='exampleDiv'>

	<p class="title">Password and confirmation</p>
	
	<p>We always want a password field with a confirmation</p>

	<div class='demoContainer' id='container2'></div>

	<div class='codeContainer'>
				<textarea name="code" class="JScript">
			var pass1 = new YAHOO.inputEx.PasswordField({showMsg: true, required: true, parentEl: 'container2'});
			var pass2 = new YAHOO.inputEx.PasswordField({showMsg: true, required: true, parentEl: 'container2'});
			pass2.setConfirmationField(pass1);
		</textarea>
			</div>

</div>



<!-- Example 3 -->
<div class='exampleDiv'>

	<p class="title">Password length</p>
	
	<p>Set the minimum password length using the <i>minLength</i> option :</p>

	<div class='demoContainer' id='container3'></div>

	<div class='codeContainer'>
				<textarea name="code" class="JScript">
			new YAHOO.inputEx.PasswordField({parentEl: 'container3', showMsg: true, minLength: 10});
		</textarea>
			</div>

</div>



<!-- Example 4 -->
<div class='exampleDiv'>

	<p class="title">Password strength indicator</p>
	
	<p>A widget indicating the strength of the password (useful for password creation) :</p>

	<div class='demoContainer' id='container4'></div>

	<div class='codeContainer'>
				<textarea name="code" class="JScript">
			new YAHOO.inputEx.PasswordField({parentEl: 'container4', showMsg: true, strengthIndicator: true});
		</textarea>
			</div>

</div>


<!-- Example 5 -->
<div class='exampleDiv'>

	<p class="title">Caps Lock Warning</p>
	
	<p>Display a warning if the caps lock key is on</p>

	<div class='demoContainer' id='container5'></div>

	<div class='codeContainer'>
				<textarea name="code" class="JScript">
			new YAHOO.inputEx.PasswordField({parentEl: 'container5', showMsg: true, capsLockWarning: true});
		</textarea>
			</div>

</div>


<!-- YUI Library -->
<script type="text/javascript" src="../lib/yui/yahoo/yahoo-min.js"></script> 
<script type="text/javascript" src="../lib/yui/dom/dom-min.js"></script> 
<script type="text/javascript" src="../lib/yui/event/event-min.js"></script>
<script type="text/javascript" src="../lib/yui/container/container-min.js"></script>

<!-- InputEx -->
<script src="../js/inputex.js"  type='text/javascript'></script>
<script src="../js/Field.js"  type='text/javascript'></script>
<script src="../js/fields/StringField.js"  type='text/javascript'></script>
<script src="../js/fields/PasswordField.js"  type='text/javascript'></script>

<script>

YAHOO.util.Event.addListener(window, 'load', function() {

	// Example 1
	new YAHOO.inputEx.PasswordField({parentEl: 'container1', showMsg: true});
	
	// Example 2
	var pass1 = new YAHOO.inputEx.PasswordField({showMsg: true, required: true, parentEl: 'container2'});
	var pass2 = new YAHOO.inputEx.PasswordField({showMsg: true, required: true, parentEl: 'container2'});
	pass2.setConfirmationField(pass1);
	
	
	// Example 3
	new YAHOO.inputEx.PasswordField({parentEl: 'container3', showMsg: true, minLength: 10});
	
	// Example 4
	new YAHOO.inputEx.PasswordField({parentEl: 'container4', showMsg: true, strengthIndicator: true});
	
	// Example 5
	new YAHOO.inputEx.PasswordField({parentEl: 'container5', showMsg: true, capsLockWarning: true});
	
	
});

</script>

<script src="js/dpSyntaxHighlighter.js"></script>
<script language="javascript"> 
dp.SyntaxHighlighter.HighlightAll('code');
</script>

 </body>
</html>